//
//  XMPointsTableViewCell.m
//  XunMi
//
//  Created by MacBook on 2024/3/14.
//  Copyright © 2024 TieZhu. All rights reserved.
//

#import "XMPointsTableViewCell.h"
#import "XMPointsModel.h"

@interface XMPointsTableViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *imgV;
@property (weak, nonatomic) IBOutlet UILabel *moneyLa;
@property (weak, nonatomic) IBOutlet UILabel *pointsLa;

@end

@implementation XMPointsTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(XMPointsModel *)model {
    _model = model;
    [self.imgV sd_setImageWithURL:kStringToUrl(model.icons.file_url) placeholderImage:kDefaultCoverImg];
    self.moneyLa.text = model.title;
    self.pointsLa.text = kStringFormat(@"(消耗%@积分)", model.score);
}

- (IBAction)exchangeAct:(UIButton *)sender {
    if (self.exchangeBlock) {
        self.exchangeBlock(self.model);
    }
}



@end
